<?php
require_once('admin_operador.php');
/**
 * Created by JetBrains PhpStorm.
 * User: MarcoHP
 * Date: 8/23/13
 * Time: 10:21 PM
 * To change this template use File | Settings | File Templates.
 */


class Admin_Controller extends Controller //Admin_Operador
{
    public $esAdministrador = false;

    public function Admin_Controller() {

        // treated as constructor in PHP 5.3.0-5.3.2
        // treated as regular method as of PHP 5.3.3
        parent::__construct();

        //$datosSession = $this->session->all_userdata();
        //print_r($datosSession,false);
        //$this->esAdministrador = $datosSession['es_administrador'];

    }

    function index()
    {
        if($this->puede_acceder()==true)
        {
        //$datosSession = $this->session->all_userdata();
        //print_r($datosSession,false);
       }
    }
    function puede_acceder()
    {

//        if ($this->esAdministrador == false )
//        {
//            //loading principal view
//            $data['main_content'] = 'principalM';
//            $this->load->view('includes/template', $data);
//        }
//        return $this->esAdministrador;
        return true;
    }
}
